# initialising a String
a = 'GeeksforGeeks'

# initialising a byte object
c = b'GeeksforGeeks'

# using encode() to encode the String
# encoded version of a is stored in d
# using ASCII mapping
d = a.encode('ASCII')

# checking if a is converted to bytes or not
if d == c:
    print("Encoding successful")
else:
    print("Encoding Unsuccessful")


# initialising a String
a = 'GeeksforGeeks'

# initialising a byte object
c = b'GeeksforGeeks'

# using decode() to decode the Byte object
# decoded version of c is stored in d
# using ASCII mapping
d = c.decode('ASCII')

# checking if c is converted to String or not
if d == a:
    print("Decoding successful")
else:
    print("Decoding Unsuccessful")


sentence = '南京审计大学'
bytes_sen = sentence.encode('utf-8')
print(bytes_sen)
str_sen = bytes_sen.decode('utf-8')
print(str_sen)

# sentence = '南京审计大学'
# bytes_sen = sentence.encode('utf-8')
# print(bytes_sen)
# sen1 = bytes_sen.decode('gbk')
# print(sen1)
# sen2 = sen1.encode('gbk')
# print(sen2)
# str_sen = sen2.decode('utf-8')
# print(str_sen)
